﻿using System;
using System.Collections.Generic;
using System.Linq;

namespace SharedData
{
    /// <summary>
    /// Weather data
    /// </summary>
    public class WeatherData
    {
        /// <summary>
        /// Because we need this, apparently.
        /// </summary>
        public WeatherData() { }

        /// <summary>
        /// Init with values
        /// </summary>
        public WeatherData(float temp, string tempUnits, float relativeHumidity)
            : this(temp.ToString(), tempUnits.ToString(), relativeHumidity.ToString()) { }

        /// <summary>
        /// Init with strings
        /// </summary>
        public WeatherData(string temp, string tempUnits, string relativeHumidity)
        {
            this.Temperature = temp + tempUnits.Replace("&deg;", "°");
            this.RelativeHumidity = relativeHumidity + "%";
        }

        /// <summary>
        /// Relative humidity
        /// </summary>
        public string RelativeHumidity { get; set; }
        /// <summary>
        /// Temperature
        /// </summary>
        public string Temperature { get; set; }
    }
}